﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeviceHistory.aspx.cs" Inherits="WebService.Admin.DeviceHistory" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Deivce History Page - GPS Travel</title>
    <style type="text/css">
        .style1
        {
            width: 583px;
        }
        .style2
        {
            width: 310px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="width:100%;">
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td class="style1">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td style="font-weight: 700" class="style1">
                    User Device List 
                    | Go to
                    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/Admin/Item.aspx" 
                        style="text-align: right">ItemList Page</asp:HyperLink>
&nbsp;
| Go to
                    <asp:HyperLink ID="HyperLink5" runat="server" 
                        NavigateUrl="~/Admin/Category.aspx" style="text-align: right">Category Page </asp:HyperLink>
&nbsp;| Go to
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/ListPlaces.aspx" 
                        style="text-align: right">ListPlaces Page</asp:HyperLink>
&nbsp;| Go to
                    <asp:HyperLink ID="HyperLink2" runat="server" 
                        NavigateUrl="~/Admin/DeviceItem.aspx" style="text-align: right">Device Page</asp:HyperLink>
&nbsp;| Go to
                    <asp:HyperLink ID="HyperLink6" runat="server" 
                        NavigateUrl="~/Admin/ItemsMultilang.aspx" style="text-align: right">Item List Multilang Page </asp:HyperLink>
&nbsp;| Go to
                    <asp:HyperLink ID="HyperLink7" runat="server" 
                        NavigateUrl="~/Admin/CategoryMultilang.aspx" style="text-align: right">Category Multilang Page</asp:HyperLink>
&nbsp;| Go to
                    <asp:HyperLink ID="HyperLink8" runat="server" 
                        NavigateUrl="~/Admin/Languages.aspx" style="text-align: right">Language Page</asp:HyperLink>
                    | Return
                    <asp:HyperLink ID="HyperLink4" runat="server" 
                        NavigateUrl="~/Admin/Default.aspx" style="text-align: right">Admin Page</asp:HyperLink>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td class="style1">
                    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" onsorting="ListView1_Sorting">
            <LayoutTemplate>
                <table border="0" cellpadding="1">
                    <tr style="background-color:#E5E5FE">
                        <th align="left"><asp:LinkButton ID="LinkButton1" runat="server" CommandName="Sort" CommandArgument="ID">ID</asp:LinkButton></th>
                        <th align="left"><asp:LinkButton ID="lnkId" runat="server" CommandName="Sort" CommandArgument="DeviceID">Device ID</asp:LinkButton></th>
                        <th align="left" style="width:200px"><asp:LinkButton ID="lnkName" runat="server" CommandName="Sort" CommandArgument="Date">Date</asp:LinkButton></th>
                        <th align="left" style="width:200px"><asp:LinkButton ID="lnkLat" runat="server" CommandName="Sort" CommandArgument="Lat">Latitude</asp:LinkButton></th>
                        <th align="left" style="width:200px"><asp:LinkButton ID="LinkLng" runat="server" CommandName="Sort" CommandArgument="Lng">Longitude</asp:LinkButton></th>
                    </tr>
                    <tr id="itemPlaceholder" runat="server"></tr>
                </table>
                <asp:DataPager ID="ItemDataPager" runat="server" PageSize="20">
                    <Fields>
                        <asp:NumericPagerField ButtonCount="2" />
                    </Fields>
                </asp:DataPager>    
            </LayoutTemplate>
            <ItemTemplate>
                    <tr>
                        <td><asp:Label runat="server" ID="Label2"><%#Eval("ID")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="lblId"><%#Eval("DeviceID")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="lblName"><%#Eval("Date")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="Label1"><%#Eval("Lat")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="Label4"><%#Eval("Lng")%></asp:Label></td>
                    </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                    <tr style="background-color:#EFEFEF">
                        <td><asp:Label runat="server" ID="Label2"><%#Eval("ID")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="lblId"><%#Eval("DeviceID")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="lblName"><%#Eval("Date")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="Label1"><%#Eval("Lat")%></asp:Label></td>
                        <td><asp:Label runat="server" ID="Label4"><%#Eval("Lng")%></asp:Label></td>
                    </tr>
            </AlternatingItemTemplate>
            
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:GPSTravelConnect %>" 
            SelectCommand="SELECT * FROM [tbl_HistoryLocation]" >
        </asp:SqlDataSource>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td class="style1">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>